<template>
  <div class="list">
    <div class="list-col time">{{item.CreateTime}}</div>
    <div class="list-col pair">{{item.PairName}}</div>
    <div class="list-col direction">{{item.Direction==1?'买入':'卖出'}}</div>
    <div class="list-col ratio">{{item.RatioTrade}}</div>
    <div class="list-col count">{{item.Traded}}&nbsp;|&nbsp;{{item.RecordCount}}</div>
    <div class="list-col price">{{item.TradedPrice}}&nbsp;|&nbsp;{{item.RecordPrice}}</div>
    <div class="list-col status">{{item.StatusString}}</div>
    <!-- 操作 -->
    <div class="list-col handle active" v-if="item.Status==1" @click="revockClick()">撤单</div>
    <div class="list-col handle" v-else-if="item.Status==2">撤单中</div>
    <div class="list-col handle" v-else-if="item.Status==3">已撤单</div>
    <div class="list-col handle" v-else-if="item.Status==4">交易完成</div>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  props: ["item"],
  methods:{
      revockClick(){
          let _this=this;
          setTimeout(() => {
              _this.$message.success("撤单成功")
          }, 1000);
      }
  }
};
</script>

<style scoped>
.list {
  display: flex;
  padding: 0 12px 0 15px;
}
.active {
  color: rgb(221, 145, 45) !important;
  cursor: pointer;
}
</style>